package com.example.bean;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

/**
 * <br>TODO(描述该类的作用)</br>
 *
 * @author 533735
 * @version 1.0
 * @email wanghong3@dafycredit.com
 * @date 2018/8/28 14:11
 * @since 1.0
 */
// 水果盘，可以拿到水果
@Component
public class FruitPlate {

    @Autowired
    private ApplicationContext applicationContext;

    // 抽象方法获取新鲜水果
    public Fruit getFruit(){
        return applicationContext.getBean(Fruit.class);
    }

}